CREATE TABLE jms_dm.dm_end_dispatch_third_loss_cnt_dt (
                                                          res_network_code varchar(30) NULL COMMENT "责任网点code",
                                                          res_agent_code varchar(30) NULL COMMENT "责任网点所属代理区code",
                                                          res_fran_code varchar(30) NULL COMMENT "责任网点所属加盟商code",
                                                          res_virt_code varchar(30) NULL COMMENT "责任网点所属虚拟代理区code",
                                                          store_code varchar(50) NULL COMMENT "门店code",
                                                          res_agent_name varchar(120) NULL COMMENT "责任网点所属代理区name",
                                                          res_fran_name varchar(120) NULL COMMENT "责任网点所属加盟商name",
                                                          res_virt_name varchar(120) NULL COMMENT "责任网点所属虚拟代理区code",
                                                          res_provider_id varchar(30) NULL COMMENT "责任网点所属省id",
                                                          res_provider_desc varchar(120) NULL COMMENT "责任网点所属省name",
                                                          res_city_id varchar(30) NULL COMMENT "责任网点所属市id",
                                                          res_city_desc varchar(120) NULL COMMENT "责任网点所属市name",
                                                          res_zone_code varchar(30) NULL COMMENT "责任网点所属加盟商name",
                                                          res_zone_name varchar(120) NULL COMMENT "责任网点所属虚拟代理区code",
                                                          res_network_name varchar(120) NULL COMMENT "责任网点name",
                                                          closing_time date NULL COMMENT "创建时间",
                                                          store_name varchar(120) NULL COMMENT "门店名称",
                                                          business_id varchar(30) NULL COMMENT "门店品牌code",
                                                          business_name varchar(120) NULL COMMENT "门店品牌名称",
                                                          third_loss_cnt decimal(22, 2) NULL COMMENT "三方遗失票数",
                                                          collect_in_cnt int(11) NULL COMMENT "入库量",
                                                          date_time date NULL COMMENT "doris分区字段"
) ENGINE=OLAP
DUPLICATE KEY(res_network_code, res_agent_code, res_fran_code, res_virt_code, store_code)
PARTITION BY RANGE (date_time) (
   START ("2023-04-01") END ("2023-04-30") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(site_code) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-186",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);